package com.itheima.Timer;

public class RoundTask {
    //延迟多少秒后执行
    int delay;
    //加入的序列号，只是标记一下加入的顺序
    int index;

    public RoundTask(int index, int delay) {
        this.index = index;
        this.delay = delay;
    }

    void run() {
        System.out.println("task " + index + " start , delay = "+delay);
    }

    @Override
    public String toString() {
        return String.valueOf(delay);
    }
}